<?php
defined('SYS_IN') OR die('error');
class model extends base{

	/**
	 * @see base::__get()
	 */
	public function __get($name){
		switch($name){
			case 'db':
				return self::_setDb();	break;
			default:
				return 	parent::__get($name);
		}
	}

	/**
	 * 获取db对象
	 **/
	private static function _setDb(){
		$dbdrive	=	'dbdrive_'.C('DB/drive');
		return	new	$dbdrive;
	}
}
?>